<template>
	<view class="container">
		<view class="content">
			<view class="title">
				<title class="title-1">退款金额</title>
				<view style="display: flex;justify-content: center;">
					<title style="width: 90%;display: flex;flex-direction: row;justify-content: space-between;">
						<title style="color: #fff;font-size: 60rpx;">
							25.00 <title style="color: #fff;font-size: 30rpx;"> 元 </title>
						</title>
						<title style="">
							<img style="max-width: 90rpx;max-height: 90rpx;" src="@/static/refund.png" alt="" />
						</title>
					</title>
				</view>
			</view>
			<view class="merchan-data-1">
				<uv-line color="#eceef2"></uv-line>
			</view>
			<view style="display: flex;justify-content: center;margin-top: 30rpx;">
				<title style="width: 90%;display: flex;flex-direction: row;justify-content: space-between;">
					<title style="color: #fff;font-size: 25rpx;">
						2024-7-4
					</title>
					<title style="color: #fff;font-size: 25rpx;">
						交易时间
					</title>
				</title>
			</view>
		</view>
		<scroll-view scroll-y="true" class="scrollbox" enable-back-to-top="true" lower-threshold="112">
			<view class="merchantList">
				<view class="merchan">
					<view style="display: flex;justify-content: center;margin-top: 30rpx;">
						<title style="width: 90%;display: flex;flex-direction: row;justify-content: space-between;">
							<title style="display: flex;flex-direction: column;">
								<title style="color: #999999;font-size: 25rpx;margin-top: 15rpx;">
									订单号
								</title>
								<title style="color: #242f66;font-size: 30rpx;">
									123456789
								</title>
							</title>
							<title style="">
								<img style="max-width: 90rpx;max-height: 90rpx;" src="@/static/ordernumber.png"
									alt="" />
							</title>
						</title>
					</view>
					<view style="display: flex;justify-content: center;margin-top: 30rpx;">
						<title style="width: 90%;display: flex;flex-direction: row;justify-content: space-between;">
							<title style="display: flex;flex-direction: column;">
								<title style="color: #999999;font-size: 25rpx;margin-top: 15rpx;">
									交易金额
								</title>
								<title style="color: #242f66;font-size: 30rpx;">
									25.00<title style="color: #fff;font-size: 20rpx;"> 元 </title>
								</title>
							</title>
							<title style="">
								<img style="max-width: 90rpx;max-height: 90rpx;" src="@/static/ordernumber.png"
									alt="" />
							</title>
						</title>
					</view>
					<view style="display: flex;justify-content: center;margin-top: 30rpx;">
						<title style="width: 90%;display: flex;flex-direction: row;justify-content: space-between;">
							<title style="display: flex;flex-direction: column;">
								<title style="color: #999999;font-size: 25rpx;margin-top: 15rpx;">
									交易时间
								</title>
								<title style="color: #242f66;font-size: 30rpx;">
									2024-7-5 13:00:00
								</title>
							</title>
							<title style="">
								<img style="max-width: 90rpx;max-height: 90rpx;" src="@/static/ordernumber.png"
									alt="" />
							</title>
						</title>
					</view>
					<view style="display: flex;justify-content: center;margin-top: 30rpx;">
						<title style="width: 90%;display: flex;flex-direction: row;justify-content: space-between;">
							<title style="display: flex;flex-direction: column;">
								<title style="color: #999999;font-size: 25rpx;margin-top: 15rpx;">
									支付方式
								</title>
								<title style="color: #242f66;font-size: 30rpx;">
									<text v-if="fenecList.payType == '1'">银行卡</text>
									<text v-if="fenecList.payType == '2'">支付宝</text>
									<text v-if="fenecList.payType == '3'">微信</text>
									<text v-if="fenecList.payType == '4'">银联二维码</text>
									<text v-if="fenecList.payType == '5'">数币</text>
									<text v-if="fenecList.payType == '6'">现金</text>
									<text v-if="fenecList.payType == '0'">未知</text>
								</title>
							</title>
							<title style="">
								<img style="max-width: 90rpx;max-height: 90rpx;" src="@/static/paymentmethod.png"
									alt="" />
							</title>
						</title>
					</view>
					<view style="display: flex;justify-content: center;margin-top: 30rpx;">
						<title style="width: 90%;display: flex;flex-direction: row;justify-content: space-between;">
							<title style="display: flex;flex-direction: column;">
								<title style="color: #999999;font-size: 25rpx;margin-top: 15rpx;">
									退款状态
								</title>
								<title style="font-size: 30rpx;">
									<text style="color: #ff3232;">退款失败</text>
									<!-- 								<text v-if="fenecList.payType == '2'">支付宝</text>
								<text v-if="fenecList.payType == '3'">微信</text>
								<text v-if="fenecList.payType == '4'">银联二维码</text>
								<text v-if="fenecList.payType == '5'">数币</text>
								<text v-if="fenecList.payType == '6'">现金</text>
								<text v-if="fenecList.payType == '0'">未知</text> -->
								</title>
							</title>
							<title style="">
								<img style="max-width: 90rpx;max-height: 90rpx;" src="@/static/paymentmethod.png"
									alt="" />
							</title>
						</title>
					</view>
				</view>
			</view>
		</scroll-view>
		<view class="button-wrap">
			<button class="button-login" @click="refundApplication">
				<text class="wx-login loginText1">审核通过</text>
			</button>
			<button class="button-login1" @click="reviewRejected">
				<text class="wx-login loginText1">审核驳回</text>
			</button>
		</view>
		<uv-popup ref="popup" mode="bottom" :closeOnClickOverlay="false" :closeable="true" :round="10" @change="change">
			<view style="display: flex;justify-content: center;">
				<view style="height: 600rpx;width: 90%;margin-top: 35rpx;">
					<title style="color: #242f66;font-size: 30rpx;">
						退款驳回原因
					</title>
					<view class="text" style="margin-bottom: 10rpx;">
						<uni-easyinput type="textarea" v-model="list.value" placeholder="请输入内容"></uni-easyinput>
					</view>
					<view class="button-wrap">
						<!-- 确定 -->
						<button class="button-login" @click="submitRefund">
							<text class="wx-login loginText1">确定</text>
						</button>
					</view>
				</view>
			</view>
		</uv-popup>
	</view>
</template>

<script>
	import {
		querySum
	} from "@/network/Home.js"
	export default {
		data() {
			return {
				list: {
					value: ""
				},
				fenecList: {
					payType: 3
				}
			}
		},
		onLoad(e) {
			// this.merchantList()
		},
		methods: {
			merchantList() {
				var arr = {

				}
				querySum(arr).then(res => {
					console.log(res)
					const code = res.data.code;
					if (code == "000000") {
						this.fenecList = res.data.data.orderSumVo
					} else {
						uni.showToast({
							title: res.data.message
						})
					}
				}).catch(err => {
					// console.log(err)
				})
			},
			refundApplication() {
				wx.navigateTo({
					url: '/pages/refund/refundReview/successfulRefund'
				})
			},
			reviewRejected() {
				this.$refs.popup.open();
			},
			submitRefund() {
				wx.switchTab({
					url: '/pages/refund/index'
				})
			},
			change(e) {
				console.log('弹窗状态改变：', e);
			},
		}
	}
</script>

<style lang="scss" scoped>
	.container {
		height: 100vh;
		background: #FFFFFF;
		display: flex;
		align-items: center;
		/* justify-content: center; */
		flex-direction: column;
	}

	.content {
		width: 100%;
		height: 20%;
		background-image: url('@/static/homePage.png');
		background-size: 100% 100%;
	}

	.merchantList {
		height: 80%;
		width: 100%;
	}

	.merchan {
		font-weight: bold;
		color: #242f66;
	}

	.ArrList {
		display: flex;
		align-items: center;
		/* justify-content: center; */
		flex-direction: column;
	}

	.List {
		background: #fff;
		height: 320rpx;
		width: 85%;
		border-radius: 20rpx;
		margin-top: 5%;
	}

	.merchan-data {
		display: flex;
	}

	.imgData {
		width: 100rpx;
		height: 100rpx;
		border-radius: 20rpx;
		background-image: url('@/static/index.png');
		background-size: 100% 100%;
		margin: 40rpx 50rpx 20rpx 50rpx;
	}

	.image {
		max-width: 100rpx;
		max-height: 100rpx;
	}

	.text {
		display: flex;
		flex-flow: column;
	}

	.merchan-data-1 {
		display: flex;
		justify-content: center;
	}

	/deep/.uv-line {
		width: 90% !important;
	}

	.merchan-data-2 {
		margin-top: 8%;
		display: flex;
		flex-direction: row;
		justify-content: space-between;
	}

	.title-1 {
		color: #fff;
		margin: 20px 0px 5px 20px;
		font-size: 30rpx;
		display: grid;
	}

	.button-wrap {
		margin-top: 50rpx;
		display: flex;
		align-items: center;
		justify-content: center;
		flex-direction: column;
	}

	.button-login {
		width: 90%;
		height: 110rpx;
		border-radius: 20rpx;
		background: #222d65;
		display: flex;
		align-items: center;
		justify-content: center;
		position: fixed;
		bottom: 180rpx;
	}

	.button-login1 {
		width: 90%;
		height: 110rpx;
		border-radius: 20rpx;
		background: #179bd7;
		display: flex;
		align-items: center;
		justify-content: center;
		position: fixed;
		bottom: 60rpx;
	}

	.loginText1 {
		margin-left: 6rpx;
		color: #fff;
		font-size: 35rpx;
	}

	.text {
		height: 100rpx;
		margin-top: 20rpx;
		border-radius: 11px;
		border: 1px solid #dfe3ed;
	}

	/deep/.uni-easyinput__content-textarea {
		height: 100px !important;
	}
</style>